Skip to content

Fix submounts of /dev being read-only with Docker 25+#4997

Merged
agners merged 1 commit intomainfrom
fix-docker-25-dev-mount
Apr 2, 2024
Merged

Fix submounts of /dev being read-only with Docker 25+#4997
agners merged 1 commit intomainfrom
fix-docker-25-dev-mount

Conversation

@sairon
Copy link
Member

@sairon sairon commented Apr 2, 2024

Proposed change

As described in #4996, Docker 25+ changes made sub-mounts of the /dev filesystem to be mounted read-only. Revert to the previous behavior by adjusting the ReadOnlyNonRecursive option. Cleaner way would be to upstream support for setting this option via Mount class arguments, so this change is meant to be rather a hotfix for the issue. Even better approach would be mounting /dev non-recursively, and taking care of creating all necessary filesystems when creating containers in Supervisor.

This change was also tested on HAOS 12.0 with Docker 24.0.7 - it just ignores the extra option without any fuss in logs.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to the supervisor)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Ruff (ruff format supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints of add-on configuration are added/changed:

As described in #4996, Docker 25+ changes made sub-mounts of the /dev
filesystem to be mounted read-only. Revert to the previous behavior by
adjusting the ReadOnlyNonRecursive option. Cleaner way would be to
upstream support for setting this option via Mount class arguments, so
this change is meant to be rather a hotfix for the issue. Even better
approach would be mounting /dev non-recursively, and taking care of
creating all necessary filesystems when creating containers in
Supervisor.
@sairon sairon added the bugfix A bug fix label Apr 2, 2024
@sairon sairon requested review from agners, mdegat01 and pvizeli April 2, 2024 14:10
@agners agners merged commit 906e400 into main Apr 2, 2024
@agners agners deleted the fix-docker-25-dev-mount branch April 2, 2024 19:07
@github-actions github-actions bot locked and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Container submounts in /dev are read-only with Docker 25+

3 participants